import request from '@/utils/system/request'

// 获取数据api
export function getData(pageIndex: number, pageSize: number, data: object) {
	return request({
		url: `/sys/user/search/${pageIndex}/${pageSize}`,
		method: 'post',
		data
	})
}

// 新增
export function add(data: object) {
	return request({
		url: '/sys/user',
		method: 'post',
		data
	})
}

// 编辑
export function update(data: object) {
	return request({
		url: '/sys/user',
		method: 'put',
		data
	})
}

// 删除
export function del(data: object) {
	return request({
		url: '/sys/user',
		method: 'delete',
		data
	})
}